import './LoginV.css';
import { useRef } from 'react';

export const LoginV = (props) => {
  let nameRef = useRef();
  let passwordRef = useRef();

  return (
    <div className='loginTitle'>
      登录
      <br />
      <div className='loginDiv'>
        <span>帐号：</span>
        <input id='name' ref={nameRef}></input>
        <br />
        <span>密码：</span>
        <input id='password' ref={passwordRef} type={'password'}></input>
      </div>
      <br />
      <button onClick={()=>{
        props.login(nameRef, passwordRef)
      }}>登录</button>
    </div>
  )
}

